Skip to content

Conversation

Kobzol
Copy link
Member

@Kobzol Kobzol commented Aug 20, 2025

This PR cleans up a bunch of test steps and adds metadata to them. I didn't yet touch the most complicated step (CompileTest), I'm leaving that for another PR.

Testing anything on stage 0 is only possible for compiletest and with build.allow-compiletest-stage0. Testing anything else on stage 0 will either produce a nice error or crash with a stage being subtracted below zero.

r? @jieyouxu

try-job: dist-x86_64-linux
try-job: aarch64-gnu
try-job: arm-android
try-job: x86_64-gnu-llvm-20*
try-job: x86_64-msvc-*
try-job: aarch64-apple
try-job: test-various

@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Aug 20, 2025
@rustbot
Copy link
Collaborator

rustbot commented Aug 20, 2025

This PR modifies src/bootstrap/src/core/config.

If appropriate, please update CONFIG_CHANGE_HISTORY in src/bootstrap/src/utils/change_tracker.rs.

@Kobzol
Copy link
Member Author

Kobzol commented Aug 20, 2025

@bors try

rust-bors bot added a commit that referenced this pull request Aug 20, 2025
Enforce in bootstrap that test must have stage at least 1 (except for compiletest)

try-job: dist-x86_64-linux
try-job: aarch64-gnu
try-job: arm-android
try-job: `x86_64-gnu-llvm-20*`
try-job: `x86_64-msvc-*`
try-job: aarch64-apple
@rust-bors

This comment has been minimized.

@rust-bors

This comment was marked as outdated.

@rust-log-analyzer

This comment has been minimized.

@rustbot rustbot added A-CI Area: Our Github Actions CI T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. labels Aug 20, 2025
@rust-log-analyzer

This comment has been minimized.

@rustbot

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@Kobzol
Copy link
Member Author

Kobzol commented Aug 20, 2025

@bors try

@rust-bors

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Aug 20, 2025
Enforce in bootstrap that test must have stage at least 1 (except for compiletest)

try-job: dist-x86_64-linux
try-job: aarch64-gnu
try-job: arm-android
try-job: `x86_64-gnu-llvm-20*`
try-job: `x86_64-msvc-*`
try-job: aarch64-apple
@rust-log-analyzer

This comment has been minimized.

@rust-bors
Copy link

rust-bors bot commented Aug 20, 2025

💔 Test for 06dca67 failed: CI. Failed jobs:

@Kobzol
Copy link
Member Author

Kobzol commented Aug 20, 2025

@bors try

@rust-bors

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Aug 20, 2025
Enforce in bootstrap that test must have stage at least 1 (except for compiletest)

try-job: dist-x86_64-linux
try-job: aarch64-gnu
try-job: arm-android
try-job: `x86_64-gnu-llvm-20*`
try-job: `x86_64-msvc-*`
try-job: aarch64-apple
@rust-log-analyzer

This comment has been minimized.

@rust-bors
Copy link

rust-bors bot commented Aug 20, 2025

💔 Test for 71ba459 failed: CI. Failed jobs:

@rust-log-analyzer

This comment has been minimized.

@rustbot
Copy link
Collaborator

rustbot commented Aug 27, 2025

This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@Kobzol
Copy link
Member Author

Kobzol commented Aug 27, 2025

@bors try

@rust-bors

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Aug 27, 2025
Enforce in bootstrap that test must have stage at least 1 (except for compiletest)

try-job: dist-x86_64-linux
try-job: aarch64-gnu
try-job: arm-android
try-job: `x86_64-gnu-llvm-20*`
try-job: `x86_64-msvc-*`
try-job: aarch64-apple
try-job: test-various
@Kobzol
Copy link
Member Author

Kobzol commented Aug 27, 2025

Ok, should be ready for a review now.

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Aug 27, 2025
@rust-bors
Copy link

rust-bors bot commented Aug 27, 2025

☀️ Try build successful (CI)
Build commit: d47e319 (d47e319edabed56167a4e98e0b0e18f8f415a7ff, parent: 4f808ba6bf9f1c8dde30d009e73386d984491587)

Copy link
Member

@jieyouxu jieyouxu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most changes look fine, I do have a question about the lint-docs / compiler doc tests

View changes since this review

Comment on lines +4842 to +4844
#[cfg_attr(not(bootstrap), doc = "```")]
#[cfg_attr(bootstrap, doc = "```")]
// ^ Needed to avoid tidy warning about odd number of backticks
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question: is this because we run doctests on rustc_lint_defs with a build compiler, which could be a stage 0 rustc which happens to be a beta rustc?

Would this be broken under local-rebuild if the build compiler happens to be the in-tree compiler that e.g. would know about feature(sanitize)? Or is that not a supported configuration for this particular case?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually I think that we can remove this now, because in the latest commit I skipped the lint-docs tests in stage 1, and running them with explicit --stage 1 runs into other failures anyway. I'll try to remove it and see what CI says.

@@ -3023,7 +3136,7 @@ impl Step for CrateRustdocJsonTypes {
);

// FIXME: this looks very wrong, libtest doesn't accept `-C` arguments and the quotes are fishy.
let libtest_args = if self.host.contains("musl") {
let libtest_args = if target.contains("musl") {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remark (not for this PR): wait, I think I wrote

// FIXME: this looks very wrong, libtest doesn't accept `-C` arguments and the quotes are fishy.

Comment on lines +3640 to +3641
// We need to run the cranelift tests with the compiler against cranelift links to, not with
// the build compiler.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: I think this meant to say

We need to run the craftlift tests with the compiler that cranelift links against, not with the build compiler

?

[test] Crashes <host>
[build] rustc 0 <host> -> CoverageDump 1 <host>
[build] rustc 1 <host> -> std 1 <host>
[test] CodegenLlvm <host>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remark: ah, compiletest ones are intentionally out of scope.

@@ -234,6 +229,20 @@ impl<'a> LintExtractor<'a> {
// Ignore allow of lints (useful for
// invalid_rust_codeblocks).
continue;
} else if let Some(text) =
line.strip_prefix("#[cfg_attr(not(bootstrap), doc = \"")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question: wait, is this now needed because the compiler that is used to build and run lint tools might be a different build compiler, versus the compiler under test?

@jieyouxu
Copy link
Member

@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-CI Area: Our Github Actions CI A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants